1. Technical Field
This invention is generally directed to a filesystem for use in a computer, embedded controller, processing system, or the like. More particularly, this invention is directed to a filesystem that organizes data storage space into logical storage blocks of different sizes.
2. Related Art
Computers, embedded controllers, and other microprocessor based systems are typically constructed from a variety of different hardware components. The hardware components may include a processor, I/O devices, human interface devices, and the like. Additionally, such systems use memory storage units to maintain the data used in the system. The memory storage units may take on a variety of different forms including, but not limited to, hard disk drives, floppy disk drives, random access memory, flash memory, and the like.
High-level application programs that are executed in such systems must often interact seamlessly with these hardware components, including the memory storage units. To this end, many systems run an operating system that acts as an interface between the application programs and the system hardware. Filesystem software may be included as part of the operating system or it may be provided as an ancillary software component that interacts with the operating system. In either instance, the filesystem software organizes the data within the memory storage units for ready access by the processor and the high-level application programs that the processor executes.
The filesystem software may employ a file/directory layer that organizes the contents of files and directories into equal-sized logical storage blocks of contiguous data on the storage device. Each logical storage block has an association with one or more corresponding physical blocks on the storage device where the data is actually retained. The file/directory layer may execute updates to the filesystem by identifying every logical storage block that needs to be updated in response to a request and rewriting the entire contents of each such logical storage block. The file/directory layer may read the contents of files and directories by reading the entire contents of every logical storage block that holds a portion of the region of data to be read.
The filesystem also may include a storage layer that maps the virtual addresses of filesystem contents to physical blocks of data on the data storage device. The storage layer may execute logical block read requests from the file/directory layer by determining the correct physical block(s) associated with the request and reading its contents from the data storage device. Similarly, the storage layer may execute write requests by either updating contents of an existing physical block(s), or by allocating an unused physical block from the data storage device to the logical storage block and then updating the contents of the physical block.
Existing filesystems are not optimized for the various types of file data that are encountered since all logical storage blocks have the same size and all physical blocks have the same size. In these existing filesystems, a fixed logical storage block size is employed for all data types and represents a compromise between file types associated with long access streams and file types associated with short access streams. Accordingly, an alternative to existing filesystem organizations is needed.